/*******************************************************************************
 * Copyright (c) 2011 LegSem.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 * Contributors:
 *     LegSem - initial API and implementation
 ******************************************************************************/
package com.legstar.eci.xmi.model;

import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

public class PackedDecimalTD {
	
	@XStreamAsAttribute
	private String addrUnit;

	@XStreamAsAttribute
	private String alignment;

	@XStreamAsAttribute
	private int base=10;

	@XStreamAsAttribute
	private int baseInAddr;

	@XStreamAsAttribute
	private int baseUnits;

	@XStreamAsAttribute
	private int baseWidth;

	@XStreamAsAttribute
	private int virtualDecimalPoint;

	@XStreamAsAttribute
	private int width;

	@XStreamAsAttribute
	private String id;

	/** {@inheritDoc}*/
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("[");
		sb.append("addrUnit" + ":'" + addrUnit + "'");
		sb.append(",");
		sb.append("alignment" + ":'" + alignment + "'");
		sb.append(",");
		sb.append("base" + ":" + base + "");
		sb.append(",");
		sb.append("baseInAddr" + ":" + baseInAddr + "");
		sb.append(",");
		sb.append("baseUnits" + ":" + baseUnits + "");
		sb.append(",");
		sb.append("baseWidth" + ":" + baseWidth + "");
		sb.append(",");
		sb.append("virtualDecimalPoint" + ":" + virtualDecimalPoint + "");
		sb.append(",");
		sb.append("width" + ":" + width + "");
		sb.append(",");
		sb.append("id" + ":'" + id + "'");
		sb.append("]");
		return sb.toString();
	}

	/**
	 * @return the addrUnit
	 */
	public String getAddrUnit() {
		return addrUnit;
	}

	/**
	 * @return the alignment
	 */
	public String getAlignment() {
		return alignment;
	}

	/**
	 * @return the base
	 */
	public int getBase() {
		return base;
	}

	/**
	 * @return the baseInAddr
	 */
	public int getBaseInAddr() {
		return baseInAddr;
	}

	/**
	 * @return the baseUnits
	 */
	public int getBaseUnits() {
		return baseUnits;
	}

	/**
	 * @return the baseWidth
	 */
	public int getBaseWidth() {
		return baseWidth;
	}

	/**
	 * @return the virtualDecimalPoint
	 */
	public int getVirtualDecimalPoint() {
		return virtualDecimalPoint;
	}

	/**
	 * @return the width
	 */
	public int getWidth() {
		return width;
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

}
